home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / pgp20src.zip / CCC.X28 < prev    next >
Text File  |  1992-08-11  |  400b  |  27 lines

  1. :
  2. #
  3. # script to compile ANSI source with a K&R compiler and unproto.
  4. #
  5.  
  6. while :
  7. do
  8.     case $1 in
  9.         -c)    ;;
  10.         -o)    shift ;;
  11.         *.c)    break ;;
  12.         *)    arg="$arg $1" ;;
  13.     esac
  14.     shift
  15. done
  16.  
  17. set -e
  18.  
  19. f=$1
  20. shift
  21. b=`basename $f .c`
  22.  
  23. cc -E -C -I. $arg $f | unproto/unproto | \
  24.     sed 's/^#[     ]*\([0-9][0-9]*\)/#line \1 "'"\/tmp\/${b}.c"'"/' >/tmp/${b}.c
  25. cc -c $arg /tmp/${b}.c $*
  26. rm /tmp/${b}.c
  27.